package com.mjlf.spring_data_access.hibernate;

import com.mjlf.spring_data_access.entity.School;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate4.HibernateTemplate;
import org.springframework.stereotype.Repository;

/**
 * @auther a123
 * @create 2018-08-22 19:08
 * @desc
 */
@Repository
public class HibernateSchoolDao {

    @Autowired
    private HibernateTemplate template;

    public void addSchool(School school){
        System.out.println(template.save(school));
    }
}
